home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Interactive Media Design Review 1999
/
Interactive Media Design Review 1999.iso
/
pc
/
Demos
/
Bombardier_PC
/
DATACH.CST
/
00206_Script_chartsSprite
< prev
next >
Wrap
Text File
|
1999-03-07
|
2KB
|
51 lines
property mySpritec, hiliteSpritec, myRectc
on new me
set mySpritec = the spriteNum of me
set hiliteSpritec = mySpritec -2
set myRectc = the rect of sprite mySpritec
puppetSprite hiliteSpritec, true
set the loc of sprite hiliteSpritec = point(-1000, -1000)
sendSprite((mySpritec - 1), #register, me)
return me
end
on checkIfInsidec me
set myRectc = the rect of sprite mySpritec
set theMouseLoc = point(the mouseH, the mouseV)
if inside(theMouseLoc, myRectc) then
set myMember = the member of sprite mySpritec
set myTop = the top of sprite mySpritec
set theH = the left of sprite mySpritec
set adjustedMouseV = (the mouseV - myTop)
set theLine = locVToLinePos(member myMember, adjustedMouseV)
set theV = linePosToLocV(member myMember, theLine)
set the loc of sprite hiliteSpritec = point(theH, (theV+myTop))
set the width of sprite hiliteSpritec = the width of member myMember
else
set the loc of sprite hiliteSpritec = point(-1000, -1000)
end if
updateStage
end
on getPlaneNamec me
set theMouseLoc = point(the mouseH, the mouseV)
if inside(theMouseLoc, myRectc) then
set hiliteV = the top of sprite hiliteSpritec - the top of sprite mySpritec
set myMember = the member of sprite mySpritec
set theLine = locVToLinePos(member myMember, hiliteV)
set theText = the text of member myMember
set textLine = line theLine of theText
set the loc of sprite hiliteSpritec = point(-1000,-1000)
else
set textLine = ""
end if
return textLine
end